<template>
	<el-card shadow="hover" header="数据统计_charts4" v-loading="loading">
		<scEcharts ref="c1" height="300px" :option="option"></scEcharts>
	</el-card>
</template>

<script>
import scEcharts from '@/components/scEcharts';

export default {
	title: "数据统计_charts4",
	icon: "el-icon-user",
	description: "数据统计",
	components: {
		scEcharts
	},
	data() {
		return {
			loading: true,
			option: {},
		}
	},
	created() {
		this.initData()
	},
	mounted() {

	},

	methods: {

		/**
		 * 初始化数据
		 */
		async initData() {
			this.loading = true
			var option = {
				title: {
					text: '',
					subtext: '系统访问人数统计',
				},
				grid: {
					top: '80px'
				},
				tooltip: {
					trigger: 'axis'
				},
				xAxis: {
					type: 'category',
					data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
				},
				yAxis: {
					type: 'value'
				},
				series: [{
					data: [120, 200, 150, 80, 70, 110, 130],
					type: 'line',
				},
					{
						data: [110, 180, 120, 120, 60, 90, 110],
						type: 'line',
					}]
			};
			this.option = option;
			this.loading = false
		}
	}
}
</script>
